#pragma once
#include <YSimpleNetwork/YTcpSession.h>
#include <YSimpleNetwork/YProactorTokenOnAccept.h>

namespace ysimple_network
{
	class YTcpServerSession 
		: public YTcpSession
	{
		YProactorTokenOnAccept		m_acceptToken;
	public:
		YTcpServerSession(ysimple_system::IProactor& proactor, SOCKET socket, bool reusedSocket, RELEASE_TCP_SESSION_FUNCTOR releaseFunctor);
		virtual ~YTcpServerSession(void);

		bool				accept( ITCPSession& listenSession, IAcceptCallback& callback)  override;
		bool				listen(const YEndPoint& endPoint, int backlog)  override;
		bool				connect(const std::string& ip, WORD port, IConnectCallback& callback) override { return false; }
		
	};

}

